package hibari.server.operations;

import hibari.PMF;
import hibari.server.lib.MultiPartRequest;

import javax.jdo.PersistenceManager;
import javax.servlet.http.HttpServletResponse;

public abstract class PMOperation extends Operation {
    public PMOperation(MultiPartRequest request, HttpServletResponse response) {
        super(request, response);
    }

    private PersistenceManager pm;

    protected PersistenceManager getPM() {
        if (this.pm == null) {
            this.pm = PMF.get().getPersistenceManager();
        }
        return this.pm;
    }

}
